﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="Matriculas_Aluno_material" Codebehind="Aluno_material.aspx.cs" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"> 
<head id="Head1" runat="server"> 
    <title></title> 
    <script type="text/javascript">
        function RowDblClick(sender, eventArgs) {
            sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());

        } 
    </script> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <asp:ObjectDataSource ID="ods_AlunoMaterial" runat="server"  
        SelectMethod="_obter_Material" TypeName="Banco.BD_Aluno_material" 
        onselecting="ods_AlunoMaterial_Selecting"> 
        <SelectParameters> 
            <asp:Parameter Name="ALUNO_ID" Type="String" /> 
            <asp:Parameter Name="MATERIAL_ID" Type="String" /> 
        </SelectParameters> 
    </asp:ObjectDataSource> 
    
    <asp:HiddenField ID="hid_MATERIAL_ID" runat="server" />
    <asp:HiddenField ID="hid_ALUNO_ID" runat="server" />
     
    <div> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
        </telerik:RadScriptManager> 
 
        <telerik:RadAjaxLoadingPanel ID="ralpGrid" runat="server" Skin="Default"> 
          </telerik:RadAjaxLoadingPanel> 
 
                 <telerik:RadAjaxPanel ID="rapGrid" runat="server" Height="250px" 
                    Width="100%" HorizontalAlign="NotSet" LoadingPanelID="ralpGrid" 
                    onajaxrequest="rapGrid_AjaxRequest"> 
 
        <telerik:RadGrid ID="rdg_Endereco_tipo" runat="server" AutoGenerateColumns="False"  
                GridLines="None" Skin="Sunset" AllowSorting="True"  
                DataSourceID="ods_AlunoMaterial" AllowAutomaticDeletes="True"  
                AllowAutomaticInserts="True" AllowAutomaticUpdates="True"  
                AllowFilteringByColumn="True" AllowPaging="True" Height="250px" >  
                <ClientSettings> 
                    <Selecting AllowRowSelect="True" /> 
                    <ClientEvents OnRowDblClick="RowDblClick" /> 
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
                </ClientSettings> 
    <MasterTableView datasourceid="ods_AlunoMaterial" commanditemdisplay="Top" EditMode="PopUp" 
                    ClientDataKeyNames="ALUNO_MATERIAL_ID" > 
    <RowIndicatorColumn> 
    <HeaderStyle Width="20px"></HeaderStyle> 
    </RowIndicatorColumn> 
 
    <ExpandCollapseColumn> 
    <HeaderStyle Width="20px"></HeaderStyle> 
    </ExpandCollapseColumn> 
        <CommandItemSettings AddNewRecordText="Adicionar Novo registro"  
            ExportToCsvText="Exportar para CSV" ExportToExcelText="Exportar para Excel"  
            ExportToPdfText="Exportar para PDF" ShowExportToExcelButton="True"  
            ShowExportToPdfButton="True" RefreshText="Atualizar" /> 
        <Columns>             
            <telerik:GridBoundColumn DataField="ALUNO_ID" HeaderText="Código"  FilterControlWidth="40px"
                UniqueName="ALUNO_ID" SortExpression="ALUNO_ID"> 
                <HeaderStyle Width="80px" /> 
                <ItemStyle Font-Size="X-Small" Width="80px" /> 
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="PES_NOME" HeaderText="Nome do Aluno" FilterControlWidth="180px"
                SortExpression="PES_NOME" UniqueName="PES_NOME">
                <HeaderStyle /> 
                <ItemStyle Font-Size="X-Small" /> 
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="MATERIAL_ID" HeaderText="Código Material" Visible="false"
                SortExpression="MATERIAL_ID" UniqueName="MATERIAL_ID">
                <HeaderStyle Width="120px" /> 
                <ItemStyle Font-Size="X-Small" Width="120px" /> 
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ALM_QTADIQUIRIDA" HeaderText="Qtde. adq" AllowFiltering="false" 
                SortExpression="ALM_QTADIQUIRIDA" UniqueName="ALM_QTADIQUIRIDA">
                <HeaderStyle HorizontalAlign="Center" Width="75px" /> 
                <ItemStyle HorizontalAlign="Center" Font-Size="X-Small" Width="75px" /> 
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ALM_DTADESAO" HeaderText="Data adesão" 
                SortExpression="ALM_DTADESAO" UniqueName="ALM_DTADESAO">
                <HeaderStyle Width="120px" /> 
                <ItemStyle Font-Size="X-Small" Width="120px" /> 
            </telerik:GridBoundColumn>       
            <telerik:GridBoundColumn DataField="Código Modalidade" Visible="false"
                HeaderText="MATERIAL_MODALIDADE_ID" SortExpression="MATERIAL_MODALIDADE_ID" 
                UniqueName="MATERIAL_MODALIDADE_ID">
                <HeaderStyle Width="120px" /> 
                <ItemStyle Font-Size="X-Small" Width="120px" /> 
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="MATRICULAS_ALUNO" HeaderText="Matrículas" AllowFiltering="false"
                SortExpression="MATRICULAS_ALUNO" UniqueName="MATRICULAS_ALUNO">
                <HeaderStyle Width="220px" /> 
                <ItemStyle Font-Size="X-Small" Width="220px" /> 
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="MTR_DESCRICAO" HeaderText="Material" Visible="false"
                SortExpression="MTR_DESCRICAO" UniqueName="MTR_DESCRICAO">
                <HeaderStyle Width="120px" /> 
                <ItemStyle Font-Size="X-Small" Width="120px" /> 
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="PESSOA_ID" HeaderText="PESSOA_ID" Visible="false"
                SortExpression="PESSOA_ID" UniqueName="PESSOA_ID">
                <HeaderStyle Width="120px" /> 
                <ItemStyle Font-Size="X-Small" Width="120px" /> 
            </telerik:GridBoundColumn>
            
        </Columns> 
 
    <EditFormSettings> 
    <EditColumn UniqueName="EditCommandColumn1" ButtonType="ImageButton"></EditColumn> 
        <PopUpSettings Modal="True" /> 
    </EditFormSettings> 
    </MasterTableView> 
                <FilterItemStyle Font-Size="XX-Small" />
            </telerik:RadGrid> 
        </telerik:RadAjaxPanel>
         
     
    </div> 
    </form> 
</body> 
</html>
